package com.zqxq.lottery.controller.jczq;

import com.zqxq.common.constant.Result;
import com.zqxq.common.enums.CodeEnum;
import com.zqxq.lottery.entity.bo.jczq.JczqWorldCupBO;
import com.zqxq.lottery.entity.vo.jczq.JczqGrandVO;
import com.zqxq.lottery.entity.vo.jczq.JczqWorldCupVO;
import com.zqxq.lottery.service.jczq.IJczqGrandService;
import com.zqxq.lottery.service.jczq.IJczqWorldCupService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@RestController
@Slf4j
public class JczqGrandController extends JczqBaseController {

    @Autowired
    private IJczqGrandService jczqGrandService;

    @PostMapping("/user/grand")
    public Result<JczqGrandVO> queryUserGrand(Long userId){
        Result rs = new Result();
        try{
            JczqGrandVO data = jczqGrandService.queryUserGrand(userId);
            rs.setData(data);
        }catch(Exception e){
            rs.setCode(CodeEnum.FAIL.getCode());
            rs.setMsg(CodeEnum.FAIL.getMsg());
            log.error("queryUserGrand Error:",e);
        }
        return rs;
    }

}
